package dongshi.daddy.trieTree;
 
public class Main {
 
	public static void main(String[] args) {
		TrieTree tree=new TrieTree();
		tree.insertString("aba");
		tree.insertString("abc");
		tree.insertString("abcd");
		tree.insertString("jack");
		tree.insertString("amazing");
		tree.insertString("express");
		tree.insertString("engine");
		tree.insertString("engines");
		tree.insertString("equipment");
		tree.insertString("j");
//		tree.insertString("aa");
//		tree.insertString("aa");
//		tree.insertString("ab");
//		tree.insertString("ba");
//		tree.insertString("jack");
//		tree.insertString("jaabcdef");
		//System.out.println(tree.root);
		//System.out.println(tree.size());
		//System.out.println(tree.getStringNum("aa"));
		//System.out.println(tree.getStringNum("ab"));
		//System.out.println(tree.getStringNum("ac"));
		System.out.println(tree.getPrefixNum("a"));
		System.out.println(tree.getPrefixNum("b"));
		System.out.println(tree.getPrefixNum("c"));

		System.out.println(tree.findByPrefix("a"));
		System.out.println(tree.findByPrefix("en"));
	}
 
}
